From 58407ab2868d3a88d1bad1253f9428a9eb33278d Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 25 May 2006 15:55:07 +0100 Subject: [PATCH] Remove redundant test in grant-table interface code. Signed-off-by: Jimi Xenidis --- xen/common/grant_table.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index 3700f78e00..ebd5caa35d 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -505,15 +505,12 @@ gnttab_setup_table( goto out; } - if ( op.nr_frames <= NR_GRANT_FRAMES ) + ASSERT(d->grant_table != NULL); + op.status = GNTST_okay; + for ( i = 0; i < op.nr_frames; i++ ) { - ASSERT(d->grant_table != NULL); - op.status = GNTST_okay; - for ( i = 0; i < op.nr_frames; i++ ) - { - gmfn = gnttab_shared_gmfn(d, d->grant_table, i); - (void)copy_to_guest_offset(op.frame_list, i, &gmfn, 1); - } + gmfn = gnttab_shared_gmfn(d, d->grant_table, i); + (void)copy_to_guest_offset(op.frame_list, i, &gmfn, 1); } put_domain(d); -- 2.30.2